package com.joolun.mall.util;

import cn.binarywang.wx.miniapp.bean.shortlink.GenerateShortLinkRequest;
import com.joolun.weixin.config.WxMaConfiguration;
import me.chanjar.weixin.common.error.WxErrorException;

/**
 *
 */
public class WxUtil {
    public static String genLink(GenerateShortLinkRequest rquest) {
        try {
            return WxMaConfiguration.getMaService( "wx8ff8d367bd2a4686").getLinkService().generateShortLink(rquest);
        } catch (WxErrorException e) {
            System.out.println(e.getMessage());
            return "";
        }
//        return "";
    }
}
